import http from "@/lib/http/http";
import { ApiFunction, DApiFunction, Options, DOptions } from "./Iapi";

class AppApi {

    /**
     * 部门机构—列表
     * @param params 请求参数
     * @param success 成功回调
     * @param error  错误回调
     */
    public BranchList(params: any = {}, success: ApiFunction = DApiFunction, error: ApiFunction = DApiFunction){
        http.Get(`/branch`, params).then((data: any) => success(data)).catch((err: any) => error(err));
    }
}

export const appApi = new AppApi();
